import { Link, Route, Switch, Redirect } from 'react-router-dom'
import RankingDetail from './RankingDetail'

export default function Ranking() {
  return (
    <div>
      <nav>
        <Link className='me-3' to='/findmusic/ranking/bsb'>
          飙升榜
        </Link>
        <Link className='me-3' to='/findmusic/ranking/xgb'>
          新歌榜
        </Link>
        <Link className='me-3' to='/findmusic/ranking/ycb'>
          原创榜
        </Link>
      </nav>
      <Switch>
        <Redirect from='/findmusic/ranking' to='/findmusic/ranking/bsb' exact />
        <Route path='/findmusic/ranking/:id' component={RankingDetail} />
      </Switch>
    </div>
  )
}
